<script setup lang="ts">
// 返回首页
function goToHome() {
  uni.switchTab({
    url: '/pages/index/index',
  })
}
</script>

<template>
  <view class="container">
    <image class="error-image" src="/static/images/404.svg" mode="aspectFit" />
    <view class="error-text">
      页面不存在
    </view>
    <view class="error-desc">
      抱歉，您访问的页面不存在或已被删除
    </view>
    <view class="back-btn" @click="goToHome">
      返回首页
    </view>
  </view>
</template>

<style lang="scss">
.container {
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 60rpx;
}

.error-image {
  width: 400rpx;
  height: 400rpx;
  margin-bottom: 40rpx;
}

.error-text {
  font-size: 36rpx;
  color: #333;
  font-weight: bold;
  margin-bottom: 20rpx;
}

.error-desc {
  font-size: 28rpx;
  color: #999;
  text-align: center;
  margin-bottom: 60rpx;
}

.back-btn {
  width: 240rpx;
  height: 80rpx;
  line-height: 80rpx;
  text-align: center;
  background: #4caf50;
  border-radius: 40rpx;
  font-size: 28rpx;
  color: #fff;
}
</style>
